<%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<% 
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>大连开发区健身中心</title>
		<link type="text/css" rel="stylesheet" href="<%=path %>/admin/styles/default.css" />
		<script type="text/javascript" src="<%=path %>/res/js/jquery.js"></script>
		<script type="text/javascript" src="<%=path %>/res/js/common.js"></script>
		<script type="text/javascript" src="<%=path %>/admin/pages/messageType/js/messageType.js"></script>
	</head>
	<body>
		<form name="form1" method="post" action="" onsubmit="">
		<input type="hidden" id="message" value="${message}"/>
		<input type="hidden" id="webPath" value="<%=path %>"/>
		<input type="hidden" id="menuId" name="menuId" value=""/>
		<input type="hidden" id="parentMenu" name="parentMenu" value=""/>
		<input type="hidden" id="method" value="<s:property value="#request.method"/>"/>
		<table id="table-data-outter">
			<tr>
				<td>
					<table id="table-data-inner" cellspacing="1">
						<tr id="tr-menu-path">
							<td colspan="4" nowrap="nowrap">
								<fieldset id="f-menu-path">当前位置:&nbsp;信息管理 &gt; 信息栏目管理</fieldset>
								<fieldset id="f-condition-display">
										<img src="<%=path%>/admin/images/main/display_on.gif" onclick="displayCondition(this,'tr-menu-path')" 
											align="bottom" width="17" height="15" alt="隐藏查询条件" /></fieldset>
							</td>
						</tr>
						<tr id="tr-condition">
							<td width="15%" class="field-title">信息栏目名称: </td>
							<td width="45%" class="field-content" colspan="3">
								<input type="hidden" name="menuBean.menuId" value="<s:property value="menuBean.menuId"/>"/>
								<input type="hidden" name="menuBean.menuLevel" value="<s:property value="menuBean.menuLevel"/>"/>
								<input type="text" class="input" name="menuBean.menuName" id="typeName" value="<s:property value="menuBean.menuName"/>" maxlength="10" style="width:150px;"/>
								<span class="font_red">*</span>
							</td>
						</tr>
						<tr id="tr-condition">
							<td width="15%" class="field-title">父级信息栏目: </td>
							<td width="45%" class="field-content">
								<s:if test='#request.method != "update"'>
								<select name="menuBean.parentMenu" onchange="changeParent(this.value)" style="width:155px;">
									<option value="">顶级</option>
									<s:iterator value="parentList" status="index">
									<option value="<s:property value="menuId"/>"<s:if test='#request.parentMenu == menuId'>selected="selected"</s:if>>
										<s:property value="menuName"/>
									</option>
									</s:iterator>
								</select>
								</s:if>
								<s:else>
								<select name="menuBean.parentMenu">
									<option value="">顶级</option>
									<s:iterator value="parentList" status="index">
									<option value="<s:property value="menuId"/>"<s:if test='menuBean.parentMenu == menuId'>selected="selected"</s:if>>
										<s:property value="menuName"/>
									</option>
									</s:iterator>
								</select>
								</s:else>
							</td>
							<td width="15%" class="field-title">是否显示成菜单: </td>
							<td width="45%" class="field-content">
								<s:if test='#request.method != "update"'>
								<input type="radio" name="menuBean.menuShow" value="0" id="notShow" checked="checked"/>
								<label for="notShow">否</label>
								<input type="radio" name="menuBean.menuShow" value="1" id="isShow" />
								<label for="isShow">是</label>
								</s:if>
								<s:else>
								<input type="radio" name="menuBean.menuShow" value="0" id="notShow" <s:if test='menuBean.menuShow == "0"'>checked="checked"</s:if>/>
								<label for="notShow">否</label>
								<input type="radio" name="menuBean.menuShow" value="1" id="isShow" <s:if test='menuBean.menuShow == "1"'>checked="checked"</s:if>/>
								<label for="isShow">是</label>
								</s:else>
							</td>
						</tr>
						<tr id="tr-condition">
							<td width="15%" class="field-title">导航菜单序号: </td>
							<td width="45%" class="field-content">
								<input type="text" class="input" name="menuBean.menuOrder" id="menuOrder" value="<s:property value="menuBean.menuOrder"/>" maxlength="10" style="width:150px;"/>
							</td>
							<td width="15%" class="field-title">导航菜单路径: </td>
							<td width="45%" class="field-content">
								<input type="text" class="input" name="menuBean.menuPath" id="menuPath" value="<s:property value="menuBean.menuPath"/>"/>
							</td>
						</tr>
					</table>
					<div id="div-button" align="center">
						<input type="button" value="保存 " onclick="submitType()"/>
						<s:if test='#request.method == "update"'>
						<input type="button" value="返回" onclick="javascript:history.back();" style="margin-left:20px;"/>
						</s:if>
					</div>
					<s:if test='#request.method != "update"'>
					<table id="table-view" cellpadding="0" cellspacing="1">
						<tr class="row-header">
							<td width="5%">序号</td>
							<td>信息栏目名称</td>
							<td width="15%">信息栏目级别</td>
							<td width="20%">操作</td>
						</tr>
						<s:iterator value="resultList" status="index">
							<s:if test='#index.odd == true'>
								<s:set name="var_class" value="'row-odd'" />
							</s:if>
							<s:else>
								<s:set name="var_class" value="'row-even'" />
							</s:else>
							<tr class="<s:property value='var_class' />"
						 	onmouseover="this.className='row-over'" onmouseout="this.className='<s:property value='var_class' />'">
								<td align="center"><s:property value="#index.count"/> </td>
								<td align="left"><s:property value="menuName"/></td>
								<td align="center"><s:property value="menuLevel"/></td>
								<td align="center">
								<a href="javascript:void(0);" onclick="initUpdate(<s:property value="menuId"/>)">修改</a>
								||
								<a href="javascript:void(0);" onclick="delType(<s:property value="menuId"/>)">删除</a>
								</td>
							</tr>
						</s:iterator>
					</table>
					</s:if>
				</td>
			</tr>
		</table>
		</form>
	</body>
</html>